
/*
 *@Description: Tieu trinh la nhiem vu cap nhat gia vang,do la tu mang Internet
 */
public class ThreadCapNhat extends Thread {

    private JfrMain jM;
    private boolean threadDone = false;

    public void done() {
        threadDone = true;
    }
    private long time;  //Thoi gian tu dong cap nhat

    public ThreadCapNhat(JfrMain hw, long time) {
        jM = hw;
        this.time = time;
    }

    public void run() {
        while (!threadDone) {
            try {
                Thread.sleep(time);
                jM.getInfor1();
                jM.getInfor();

            } catch (Exception ex) {
                System.out.print(ex);
            }
        }


    }
}
